-
Notifications
You must be signed in to change notification settings - Fork 14k
fix the fragment_in_dst_padding_gets_overwritten test on s390x #149056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Given that what we are testing here is entirely target-independent code (the handling of provenance in the interpreter), I think I'd prefer just skipping the test on s390x over the risk of making the test not test the right thing any more. |
If you add |
|
Actually never mind that, |
|
ok for me. I'll revert the test and disable the test on s390x. |
on s390x 128bit types have a smaller alignment then on x86[^1]. This leads to smaller structs and therefore the write_unaligned will write outside of the structs boundary. For now disable the tests on s390x. [^2] [^1]: s390x ELF ABI Table 1.1, Page 12 https://github.com/IBM/s390x-abi [^2]: rust-lang#149056 (comment)
eae45d8 to
e58572b
Compare
|
This looks great, thanks! Please squash the commits, then we can land this. Please use the @rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
on s390x 128bit types have a smaller alignment then on x86[^1]. This leads to smaller structs and therefore the write_unaligned will write outside of the structs boundary. For now disable the tests on s390x. [^2] [^1]: s390x ELF ABI Table 1.1, Page 12 https://github.com/IBM/s390x-abi [^2]: rust-lang#149056 (comment) Co-authored-by: Ralf Jung <post@ralfj.de>
425b450 to
10172d1
Compare
|
@rustbot ready |
|
Thanks! @bors r+ rollup |
…rite, r=RalfJung
fix the fragment_in_dst_padding_gets_overwritten test on s390x
on s390x 128bit types have a smaller alignment then on x86[^1]. This leads to smaller structs (24 instead of 32 bytes) and therefore the write_unaligned will write outside of the structs boundary.
To fix the test, change the trailing u32 into a u8. This will generate 7 trailing padding bytes on s390x and 15 on x86_64. Also change the start of the garbage data so it will span over x,y and padding:
```
s390x: XXXXXXXXXXXXXXXXY-------
x86_64: XXXXXXXXXXXXXXXXY---------------
GGGGGGGG
```
[^1]: s390x ELF ABI Table 1.1, Page 12 https://github.com/IBM/s390x-abi
Rollup of 7 pull requests Successful merges: - #146341 (minimal dirfd implementation (1/4)) - #146925 (Add doc for va_list APIs) - #147035 (alloc: fix `Debug` implementation of `ExtractIf`) - #147173 (Add support for hexagon-unknown-qurt target) - #149041 (ignore unsized types in mips64 and sparc64 callconvs) - #149056 (fix the fragment_in_dst_padding_gets_overwritten test on s390x) - #149095 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
…rite, r=RalfJung
fix the fragment_in_dst_padding_gets_overwritten test on s390x
on s390x 128bit types have a smaller alignment then on x86[^1]. This leads to smaller structs (24 instead of 32 bytes) and therefore the write_unaligned will write outside of the structs boundary.
To fix the test, change the trailing u32 into a u8. This will generate 7 trailing padding bytes on s390x and 15 on x86_64. Also change the start of the garbage data so it will span over x,y and padding:
```
s390x: XXXXXXXXXXXXXXXXY-------
x86_64: XXXXXXXXXXXXXXXXY---------------
GGGGGGGG
```
[^1]: s390x ELF ABI Table 1.1, Page 12 https://github.com/IBM/s390x-abi
Rollup of 6 pull requests Successful merges: - #146925 (Add doc for va_list APIs) - #147035 (alloc: fix `Debug` implementation of `ExtractIf`) - #147173 (Add support for hexagon-unknown-qurt target) - #149041 (ignore unsized types in mips64 and sparc64 callconvs) - #149056 (fix the fragment_in_dst_padding_gets_overwritten test on s390x) - #149095 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
…rite, r=RalfJung
fix the fragment_in_dst_padding_gets_overwritten test on s390x
on s390x 128bit types have a smaller alignment then on x86[^1]. This leads to smaller structs (24 instead of 32 bytes) and therefore the write_unaligned will write outside of the structs boundary.
To fix the test, change the trailing u32 into a u8. This will generate 7 trailing padding bytes on s390x and 15 on x86_64. Also change the start of the garbage data so it will span over x,y and padding:
```
s390x: XXXXXXXXXXXXXXXXY-------
x86_64: XXXXXXXXXXXXXXXXY---------------
GGGGGGGG
```
[^1]: s390x ELF ABI Table 1.1, Page 12 https://github.com/IBM/s390x-abi
Rollup of 9 pull requests Successful merges: - #146925 (Add doc for va_list APIs) - #147035 (alloc: fix `Debug` implementation of `ExtractIf`) - #147173 (Add support for hexagon-unknown-qurt target) - #148261 (rustc_public: Make Id types !Send / !Sync) - #149041 (ignore unsized types in mips64 and sparc64 callconvs) - #149043 ( rustdoc-json: add rlib path to ExternalCrate to enable robust crate resolution) - #149056 (fix the fragment_in_dst_padding_gets_overwritten test on s390x) - #149095 (rustc-dev-guide subtree update) - #149108 ([AIX][ppc64le-linux-gnu] Add Amy Kwan to target maintainers) r? `@ghost` `@rustbot` modify labels: rollup
…rite, r=RalfJung
fix the fragment_in_dst_padding_gets_overwritten test on s390x
on s390x 128bit types have a smaller alignment then on x86[^1]. This leads to smaller structs (24 instead of 32 bytes) and therefore the write_unaligned will write outside of the structs boundary.
To fix the test, change the trailing u32 into a u8. This will generate 7 trailing padding bytes on s390x and 15 on x86_64. Also change the start of the garbage data so it will span over x,y and padding:
```
s390x: XXXXXXXXXXXXXXXXY-------
x86_64: XXXXXXXXXXXXXXXXY---------------
GGGGGGGG
```
[^1]: s390x ELF ABI Table 1.1, Page 12 https://github.com/IBM/s390x-abi
on s390x 128bit types have a smaller alignment then on x861. This leads to smaller structs (24 instead of 32 bytes) and therefore the write_unaligned will write outside of the structs boundary.
To fix the test, change the trailing u32 into a u8. This will generate 7 trailing padding bytes on s390x and 15 on x86_64. Also change the start of the garbage data so it will span over x,y and padding:
Footnotes
s390x ELF ABI Table 1.1, Page 12 https://github.com/IBM/s390x-abi ↩